package rickyGame.resource
{
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.geom.Point;
	import flash.geom.Rectangle;
	
	import rickyGame.utils.ResURL;

	/**
	 * 图标资源获取类
	 */
	public class IconCache
	{
		
		public function IconCache()
		{
			
		}
		
		/**
		 * 物品图标
		 */
		public static var GOODS_ICON:String="goods.png";
		
		public static var EQUIPMENT_ICON:String="equipment.png";
		
		/**
		 * 得到图标资源
		 * @i:uint x坐标索引
		 * @j:uint y坐标索引
		 * @iconType:String 物品图标类型
		 * @iconw:Number 图标宽
		 * @iconh:Number 图标高
		 */
		public static function getIconData(i:uint=4,j:uint=2,iconType:String="goods.png",iconw:Number=32,iconh:Number=32):BitmapData
		{
//			ResourceCache.inst.getRes(
//			var bit:Bitmap= ResourceCahch1.instance.bitmapCache.getValue(iconType);   //ResourceCache.inst.RES_MAP[iconType];
//			if(bit)
//			{
//				var bitdata:BitmapData=new BitmapData(iconw,iconh,true,0);
//				bitdata.copyPixels(bit.bitmapData,new Rectangle(i*iconw,j*iconh,iconw,iconh),new Point(0,0));
//				return bitdata;
//			}
//			else
//			{
//				
//				ResourceCahch1.instance.getBitmapRes(ResURL.getIconByTypeURL(iconType),null);
//				return new BitmapData(iconw,iconh,true,0);
//			}
			return null
		}
		
		/**
		 * 物品类型
		 */
		public static var IconTypeGoods:String="goods.png";
		
		/**
		 * 装备类型
		 */
		public static var IconTypeEquipment:String="equipment.png";
	}
}